package com.neusoft.elmboot.controller;

import java.util.List;

import com.neusoft.elmboot.result.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.neusoft.elmboot.po.Food;
import com.neusoft.elmboot.service.FoodService;
/**
 * 食品
 * Controller
 */
@Slf4j
@RestController
@RequestMapping("/FoodController")
public class FoodController {

    @Autowired
    private FoodService foodService;
    @RequestMapping(value = "/listFoodByBusinessId")
    public Result<List<Food>> listFoodByBusinessId(Food food) throws Exception{
        log.info("调用接口：根据商家ID列出食品信息");
        return Result.success(foodService.listFoodByBusinessId(food.getBusinessId()));
    }
}